@startuml
namespace controller {
    class Handler << (S,Aquamarine) >> {
        - log *zap.SugaredLogger
        - writer *writer.Writer
        - v8sClient *generated.ClientWithResponses

        - checkReadiness(ctx context.Context, wantedState string, resourceName string) (types.Task, error)
        - sendAttributes(rqUUID string, security types.InstanceAttributesSecurity) error

        + CreateTask(ctx context.Context, stepChan <font color=blue>chan</font> types.Step, resourceID string, resourceCode string, composeJSON1 string, projectCode string, resourceName string, taskName string) error
        + DeleteTask(ctx context.Context, stepChan <font color=blue>chan</font> types.Step, projectCode string, resourceCode string) error
        + StopTask(ctx context.Context, stepChan <font color=blue>chan</font> types.Step, projectCode string, resourceCode string) error
        + ResumeTask(ctx context.Context, stepChan <font color=blue>chan</font> types.Step, projectCode string, resourceCode string) error
        + GetTask(ctx context.Context, resourceID string) (types.Task, error)

    }
    interface Handlers  {
        + CreateTask( context.Context,  <font color=blue>chan</font> types.Step,  string,  string,  string,  string,  string,  string) error
        + DeleteTask( context.Context,  <font color=blue>chan</font> types.Step,  string,  string) error
        + ResumeTask( context.Context,  <font color=blue>chan</font> types.Step,  string,  string) error
        + StopTask( context.Context,  <font color=blue>chan</font> types.Step,  string,  string) error
        + GetTask( context.Context,  string) (types.Task, error)

    }
    class controller << (S,Aquamarine) >> {
        - log *zap.SugaredLogger
        - handlers Handlers
        - reader *reader.Reader
        - writer *writer.Writer
        - properties configuration.KafkaProperties

        - dispatch(ctx context.Context, msg types.SSPPartnerMessage)
        - writeStep(step types.Step, from types.SSPPartnerMessage, projectCode string)
        - doWriteStep(step types.Step, from types.SSPPartnerMessage, projectCode string, stageStatus string)
        - handleFunctionMessage(ctx context.Context, msg types.SSPPartnerMessage)
        - handleStatus(ctx context.Context, msg types.SSPPartnerMessage) error

        + Start(ctx context.Context)

    }
}

"controller.Handlers" <|-- "controller.Handler"

@enduml
